package cn.edu.scau.cmi.ema.dao;

import cn.edu.scau.cmi.ema.base.CmiPagination;
import cn.edu.scau.cmi.ema.domain.Purchasematerial;
import org.springframework.dao.DataAccessException;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Set;

public interface PurchasematerialDAO extends JpaDao<Purchasematerial> {

	public Purchasematerial findPurchasematerialById(Integer id) throws DataAccessException;

	public Purchasematerial findPurchasematerialById(Integer id, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByName(String name) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByName(String name, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByNameContaining(String name_1) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByNameContaining(String name_1, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDate(Calendar date) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDate(Calendar date, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByPrice(BigDecimal price) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByPrice(BigDecimal price, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByQuantity(BigDecimal quantity) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByQuantity(BigDecimal quantity, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDescription(String description) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDescription(String description, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDescriptionContaining(String description_1)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialByDescriptionContaining(String description_1, int startResult,
			int maxRows) throws DataAccessException;

	public Purchasematerial findPurchasematerialByPrimaryKey(Integer id) throws DataAccessException;

	public Purchasematerial findPurchasematerialByPrimaryKey(Integer id, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialsByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Purchasematerial> findAllPurchasematerials() throws DataAccessException;

	public Set<Purchasematerial> findAllPurchasematerials(int startResult, int maxRows) throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialsByMaterial(Integer materialId, int start, int max);

	public Set<Purchasematerial> findPurchasematerialsByProducer(Integer producerId, int start, int max);

	public Set<Purchasematerial> findPurchasematerialsBySupplier(Integer supplierId, int start, int max);

	public Set<Purchasematerial> findPurchasematerialsByUnit(Integer unitId, int start, int max);

	public Set<Purchasematerial> findPurchasematerialByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Purchasematerial> findPurchasematerialsByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Purchasematerial findPurchasematerialByPhysicalPrimaryKey(Integer producerId, Integer supplierId,
			Integer materialId, Calendar date) throws DataAccessException;

	public Purchasematerial findPurchasematerialByPhysicalPrimaryKey(Integer producerId, Integer supplierId,
			Integer materialId, Calendar date, int startResult, int maxRows) throws DataAccessException;
}
